home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c,comp.lang.c++
- Path: news.inap.net!news1!ind-000-236-60
- From: dlmiller@iquest.net (Doug Miller)
- Subject: Re: H E L P
- X-Nntp-Posting-Host: ind-000-236-60.iquest.net
- Message-ID: <DpAx1J.4n9@iquest.net>
- Sender: news@iquest.net (News Admin)
- Organization: IQuest Network Services
- X-Newsreader: News Xpress Version 1.0 Beta #2.1
- References: <N.040296.013047.18@DynamicPPP-185.HIP.CAM.ORG> <Pine.A32.3.91.960402135001.121719B-100000@green.weeg.uiowa.edu> <4js6jh$ndr@solutions.solon.com>
- Date: Wed, 3 Apr 1996 19:36:58 GMT
-
- seebs@solutions.solon.com (Peter Seebach) wrote:
- >In article <Pine.A32.3.91.960402135001.121719B-100000@green.weeg.uiowa.edu>,
- >The Amorphous Mass <robinson@blue.weeg.uiowa.edu> wrote:
- >>On Tue, 2 Apr 1996 ramrod@cam.org wrote:
- >
- >>> The part that I am having a hard time with is the part that
- >>> whatever number I enter for the age, I'm supposed to get the same number
- >>> of happy faces, automatically. For example If I say I am 45 years old,
- >>> then the program should show 45 happy faces.
- >
- >> You need a loop. Look up the for, while, and do while loop constructs in
- >>your textbook.
- >
- >This is a bit strong. You don't *need* a loop. You just probably want one.
- >
- >Obviously, if you're assuming age, you would have no more than about 150 ifs
- >to test, (assuming humans), and if you just want to do it for 45, it's even
- >easier.
- >
-
- Obviously you didn't read what he wrote. To satisfy the conditions of the task as he stated it,
- he would need an infinite number of ifs ("whatever number I enter..."). I saw nothing in his
- statement of the task that placed any limits of any sort on the number -- thus, he *does* need
- a loop.
-
-